import request from '@/config/axios'

// 分页
export const getPage = async (params: any) => {
  return await request.get({url: `/promotion/fod/config/page`, params})
}

// 详情
export const getDetailById = async (id: number | string) => {
  return await request.get({url: `/promotion/fod/config/get/` + id})
}

// 读取
export const read = async () => {
  return await request.get({url: `/promotion/fod/config/read`})
}

// 写入
export const write = async (data: any) => {
  return await request.post({
    url: `/promotion/fod/config/write`,
    data,
    showSuccessMessage: true
  })
}
